/*
Author - Ido
*/
#include "BigNumber.h"
#include <sstream>
#include <string>

/**
* convert number of any given type to string
**/
template <class T>
string typeToString( T num)
{
	stringstream ss;
	string s;
	ss << num;
	ss >> s;
	return s;
}

/**
* Contractor from char
**/
big_number::big_number(char num){init(typeToString(num));}

/**
* Contractor from short
**/
big_number::big_number(short num){init(typeToString(num));}

/**
* Contractor from int
**/
big_number::big_number( int num){init(typeToString(num));}

/**
* Contractor from long
**/
big_number::big_number(long num){init(typeToString(num));}

/**
* Contractor from long long
**/
big_number::big_number(long long num){init(typeToString(num));}

/**
* Contractor from unsigned char
**/
big_number::big_number(unsigned char num){init(typeToString(num));}

/**
* Contractor from unsigned short
**/
big_number::big_number(unsigned short num){init(typeToString(num));}

/**
* Contractor from unsigned int
**/
big_number::big_number(unsigned int num){init(typeToString(num));}

/**
* Contractor from unsigned long
**/
big_number::big_number(unsigned long num){init(typeToString(num));}

/**
* Contractor from unsigned long long
**/
big_number::big_number(unsigned long long num){init(typeToString(num));}

/**
* Contractor from float
**/
big_number::big_number(float num){init(typeToString(num));}

/**
* Contractor from double
**/
big_number::big_number(double num){init(typeToString(num));}

/**
* Contractor from long double
**/
big_number::big_number(long double num){init(typeToString(num));}